home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / mlib / include / mimages.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-15  |  2.0 KB  |  53 lines

  1.  
  2. #ifndef __MIMAGES_H
  3. #define __MIMAGES_H
  4.  
  5. #define REPEAT_SIGN      255       // In compressing, this char is not used.
  6. #define NO_CHANGE       NULL
  7.  
  8. #define MIMAGE_ID          0x010E
  9.  
  10. #define NORMAL_PUT         1
  11. #define AND_PUT            2
  12. #define OR_PUT             3
  13. #define XOR_PUT            4
  14. #define SEETH_PUT          5
  15.  
  16. #define T_COLOR         0x00
  17.  
  18. class MImage : public cArray {
  19. protected:
  20.     WORD                     CompSize;
  21.     WORD                     Length;
  22.     WORD                     Width;
  23.     WORD                     PutType;
  24. protected:
  25.     virtual inline void      MoveMasked (WAY Way, WORD Offset, PTR Where, WORD HowMany, SIZE OfHowMuch, WORD Skip = 0, WORD Ignore = 0);
  26. public:
  27.                  MImage (WORD len = 1, WORD wid = 1, BYTE *nmem = NULL);
  28.                  MImage (const MImage& image);
  29.     virtual void             Put (int offx, int offy, BOOL mask = FALSE);
  30.     void                     Get (int offx, int offy);
  31.     virtual void             Compress ();
  32.     virtual void             Decompress ();
  33.     virtual void             LoadDirect (int fp);
  34.     void                     SetPut (int NewPut);
  35.     inline WORD              GetLength (void) const {return (Length);};
  36.     inline WORD              GetWidth (void) const {return (Width);};
  37.     inline DWORD             GetSize (void) const {return (size);};
  38.     inline WORD              GetCompSize (void) const {return (CompSize);};
  39.     virtual void             Blend (ADR with, ADR into);
  40.     virtual void             Redefine (WORD nlen = 1, WORD nwid = 1, BYTE *nmem = NULL);
  41.     virtual void             Redefine (const MImage& NewImage);
  42.     virtual void             SaveDirect (int fp);
  43.     virtual inline BYTE *    GetBitmap (void) const;
  44.     virtual inline operator  BYTE*() const;
  45.     BOOL                     IsCompressed (void) const;
  46.     virtual inline classType isA (void) {return (MIMAGE_ID);};
  47.     friend                   MMob;
  48.                 ~MImage (void);
  49. };
  50. typedef MImage IMAGE;
  51.  
  52. #endif
  53.